package com.ruyuan.eshop.buyer.controller.aftersale;

import com.ruyuan.eshop.common.domain.entity.AfterSaleLogDO;
import com.ruyuan.eshop.common.service.aftersale.AfterSaleLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 售后服务日志相关API
 * @author pwd
 * @version 1.0
 */
@Api(description="售后服务相关API")
@RestController
@RequestMapping("/api/v1.0/after-sales/log")
@Validated
public class AfterSaleLogBuyerController {

    @Autowired
    private AfterSaleLogService afterSaleLogService;

    @ApiOperation(value = "获取售后服务操作日志信息", response = AfterSaleLogDO.class)
    @GetMapping(value = "/{service_sn}")
    public List<AfterSaleLogDO> list(@PathVariable("service_sn") String serviceSn){

        return afterSaleLogService.list(serviceSn);
    }
}
